package com.gdust.gkyx.home.controller;

import com.gdust.gkyx.client.product.ProductFeignClient;
import com.gdust.gkyx.common.result.Result;
import com.gdust.gkyx.model.product.Category;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName: CategoryApiController
 * Package: com.gdust.gkyx.home.controller
 * Description:
 *
 * @Author syun
 * @Create 2025/1/28 9:11
 * @Version 1.0
 */
@Api(tags = "商品分类")
@RestController
@RequestMapping("api/home")
public class CategoryApiController {
    @Autowired
    private ProductFeignClient productFeignClient;

    //查询所有分类
    @GetMapping("category")
    public Result categoryList() {
        List<Category> categoryList = productFeignClient.findAllCategoryList();
        return Result.ok(categoryList);
    }



}
